/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package supply;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;


class inventory {
static int inventoryRice=10;
static int inventoryVegetables=10;
static int inventoryNoodles=10;
static int inventoryEggs=10;
static int inventoryChillisauce=10;
static int inventoryChicken=10;
static int inventoryEggSoysauce=10;
static int inventoryChickenSoysauce=10;
static int inventoryChickenpowder=10;
static int inventoryThicknoodles=10;
int inventoryProductQuantity;

InputStreamReader is2=new InputStreamReader(System.in);
BufferedReader br2=new BufferedReader(is2);
Main m1=new Main();


    void availableitems() throws IOException
    {
        System.out.println("Items Available in the Inventory are : ");
        System.out.println("Rice :"+inventoryRice);
        System.out.println("Vegetables :"+inventoryVegetables);
        System.out.println("Noodles :"+inventoryNoodles);
        System.out.println("Eggs :"+inventoryEggs);
        System.out.println("Chillisauce :"+inventoryChillisauce);
        System.out.println("Chicken:"+inventoryChicken);
        System.out.println("Egg Soy Sauce:"+inventoryEggSoysauce);
        System.out.println("Chicken Soy Sauce :"+inventoryChickenSoysauce);
        System.out.println("Chicken Powder:"+inventoryChickenpowder);
        System.out.println("Thick Noodles:"+inventoryThicknoodles);
        System.out.println();
        Main.starting();

    }

    void product0(int inventoryProductQuantity) throws IOException {
        System.out.println("The Items Needed are :");
        System.out.println("Rice");
        System.out.println("Vegetables");
        System.out.println("Chilli Sauce");
        System.out.println();

        if(inventoryRice<0||inventoryVegetables<0||inventoryChillisauce<0 )
            {
            System.out.println("The Required product cannot be make due to Out of stock ");
            availableitems();
            }
        else
            {
            for(int q=0;q<inventoryProductQuantity;q++)
            {
            inventoryRice--;
            inventoryVegetables--;
            inventoryChillisauce--;
            }
            availableitems();
       // Main.starting();
            }
        
        
        }


    void product1(int inventoryProductQuantity) throws IOException {
        System.out.println("The Items Needed are :");
        System.out.println("Thick Noodles");
        System.out.println("Vegetables");
        System.out.println("Chilli Sauce");

        if(inventoryThicknoodles<0||inventoryVegetables<0||inventoryChillisauce<0 )
            {
            System.out.println("The Required product cannot be make due to Out of stock ");
            availableitems();
            }
        else
            {
        for(int q=0;q<inventoryProductQuantity;q++)
        {
            inventoryThicknoodles--;
            inventoryVegetables--;
            inventoryChillisauce--;
        }
        availableitems();
        Main.starting();
        }
                    }


    void product2(int inventoryProductQuantity) throws IOException {
        System.out.println("The Items Needed are :");
        System.out.println("Rice");
        System.out.println("Vegetables");
        System.out.println("Chilli Sauce");
        System.out.println("Eggs");
        System.out.println("Egg Soy Sauce");

        if(inventoryRice<0||inventoryVegetables<0||inventoryChillisauce<0||inventoryEggs<0||inventoryEggSoysauce<0)
            {
            System.out.println("The Required product cannot be make due to Out of stock ");
            availableitems();
            }
        else
            {
        for(int q=0;q<inventoryProductQuantity;q++)
        {
            inventoryRice--;
            inventoryVegetables--;
            inventoryChillisauce--;
            inventoryEggs--;
            inventoryEggSoysauce--;
        }
        availableitems();
        Main.starting();

                    }}


    void product3(int inventoryProductQuantity) throws IOException {
        System.out.println("The Items Needed are :");
        System.out.println("Noodles");
        System.out.println("Eggs");
        System.out.println("Egg Soy Suuce");

        if(inventoryNoodles<0||inventoryEggs<0||inventoryEggSoysauce<0 )
            {
            System.out.println("The Required product cannot be make due to Out of stock ");
            availableitems();
            }
        else
            {

        for(int q=0;q<inventoryProductQuantity;q++)
        {
            inventoryNoodles--;
            inventoryEggs--;
            inventoryEggSoysauce--;
        }
        availableitems();
        Main.starting();
                    }}


    void product4(int inventoryProductQuantity) throws IOException {
        System.out.println("The Items Needed are :");
        System.out.println("Rice");
        System.out.println("Vegetables");
        System.out.println("Chilli Sauce");
        System.out.println("Chicken");
        System.out.println("Chicken Soy Sauce");
        System.out.println("Chicken Powder");

        if(inventoryRice<0||inventoryVegetables<0||inventoryChillisauce<0||inventoryChicken<0||inventoryChickenSoysauce<0||inventoryChickenpowder<0 )
            {
            System.out.println("The Required product cannot be make due to Out of stock ");
            availableitems();
            }
        else
            {
        for(int q=0;q<inventoryProductQuantity;q++)
        {
            inventoryRice--;
            inventoryVegetables--;
            inventoryChillisauce--;
            inventoryChicken--;
            inventoryChickenSoysauce--;
            inventoryChickenpowder--;
        }
        availableitems();
        Main.starting();
                    }}


    void product5 (int inventoryProductQuantity) throws IOException {

       

       product0(inventoryProductQuantity);
       product3(inventoryProductQuantity);
        
    }


}
